<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="__JS__/validfrom/css/style.css" type="text/css" media="all" />
<link href="__JS__/validfrom/css/demo.css" type="text/css" rel="stylesheet" />
<link href="__JS__/validfrom/plugin/jqtransform/jqtransform.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="__JS__/validfrom/js/Validform_v5.2_min.js"></script>
<script type="text/javascript" src="__JS__/validfrom/plugin/jqtransform/jquery.jqtransform-min.js"></script>
<literal>
<script>
$(document).ready(function(){
	
	
	$(".registerform").Validform({
		tiptype:function(msg,o,cssctl){
			if(!o.obj.is("form")){
				var objtip=o.obj.parents("td").next().find(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
			}

		}/*,
		usePlugin:{
			jqtransform:{}
		}*/
	});

	$("#submitImage").bind("click",function(){
		$('#orderForm').ajaxSubmit(options); 
	});
	
	var options={
			 beforeSubmit:  showRequest,  
			 success:       showResponse  
	};
	function showRequest(formData, jqForm, options) {  
		
		if($("#U_RNAME").val()==""){
			return false;
		}
		if($("#U_EMAIL").val()==""){
			return false;
		}
		if($("#U_MOBILE").val()==""){
			return false;
		}
		if($("#AR_L1").val()==""){
			return false;
		}
		if($("#AR_L2").val()==""){
			return false;
		}
		if($("#AR_L3").val()==""){
			return false;
		}
		 return true;
	}
	
	function showResponse(rs, statusText, xhr, $form)  { 
		
		var type='2';
		var info="修改密码失败！";
		var url="?g=Home&m=Member&a=upwd";
		if(rs=='p'){
			info="输入旧密码错误！";
		}
		if(rs=='SRVTEAM'){
			info="修改密码成功！";
			type='1';
			url="?g=Home&m=Order&a=srvlist";
		}
		if(rs=='CR'){
			info="修改密码成功！";
			type='1';
			url="?g=Home&m=Order&a=olist";
		}
		window.location.href="?g=Home&m=Index&a=info&type="+type+"&info="+encodeURI(info)+"&url="+encodeURIComponent(url);
		
	} 
	//得到地区
	$("#AR_L1").bind('change',function(){
		if($(this).val()==''){
			return false;
		}
		$("#AR_L2").empty();
		$("#AR_L2").append('<option value="">--市辖区--</option>');
		getArea('AR_L1',$(this).val(),'AR_L2');
	});
	$("#AR_L2").bind('change',function(){
		if($(this).val()==''){
			return false;
		}
		$('#AR_L3').empty();
		$('#AR_L3').append('<option value="">--区县--</option>');
		getArea('AR_L1|AR_L2',$("#AR_L1").val()+"|"+$(this).val(),'AR_L3');
	});
	
});

function getArea(stName,st,fl){
	$.ajax({
		   type: "POST",
		   url: "?g=Home&m=Index&a=getArea",
		   data: "stName="+stName+"&st="+st+"&fl="+fl+'&rd'+Math.random(),
		   dataType:'json',
		   success: function(msg){
			 if(msg.sucess=='y'){
				var f=msg.fl;
				var data=msg.data;
				var _html=[];
				var k;
				for (k in data){
					_html.push('<option value="'+data[k]+'">'+data[k]+'</option>');
				}
				
				$("#"+f).append(_html.join(''));
				
				for (k in data){
					_html.push('<li><a href="javascript:;">'+data[k]+'</a></li>');
				}
				$("#"+f+"_1").append(_html.join(''));
			 }
		     
		   }
	});
}
</script>
</literal>
<style>

.content{
	background-color:#F9F9F9;
	width:750px;
	height:440px;
	margin-left:95px;
}
</style>
<div id="container">
<div class="content" style="height:420px;">
<form action="" method="post" id="orderForm" class="registerform">
	<div style="padding-top:20px;">
		<table border=0 cellspacing=0 cellpadding=0 width="100%">
			<tr>
				
				<td colspan="3" align="left" valign="bottom">
				<div style="padding-left:20px;height:20px;color:#FF7625;font-weight:bold;font-size:15px;">修改信息
				
				</div>
				
				</td>
			</tr>
			<tr>
			<td colspan="3" valign="top">
				<div style="height:2px;width:150px;background-color:#FF7625;margin-left:20px;"></div>
				</td>
			</tr>
			<tr>
				<td width="120px">
					
				</td>
				<td  align="left">
					<div style="">
					<table border="0" >
		                <tr>
		                    <td class="need" style="width:0px;"></td>
		                    <td style="width:80px;line-height:30px;"><span class="inputYes">*</span>姓名</td>
		                    <td style=""><input type="text" id="U_RNAME" name="data[U_RNAME]" class="inputxt" value="{$userInfo.U_RNAME}" datatype="*" nullmsg="请输入姓名！"  /></td>
		                    <td><div class="Validform_checktip">请输入姓名</div></td>
		                </tr>
		                 <tr>
		                    <td class="need" style="width:0px;"></td>
		                    <td style="width:80px;line-height:30px;"><span class="inputYes">*</span>邮箱</td>
		                    <td style=""><input type="text" id="U_EMAIL" name="data[U_EMAIL]" class="inputxt" value="{$userInfo.U_EMAIL}" datatype="*" nullmsg="请输入邮箱！"  />
		                     <input type="hidden" id="OLD_U_EMAIL" name="data[OLD_U_EMAIL]" value="{$userInfo.U_EMAIL}"  />
		                    </td>
		                    <td><div class="Validform_checktip">请输入邮箱</div></td>
		                </tr>
		                
		                 <tr>
		                    <td class="need" style="width:0px;"></td>
		                    <td style="width:80px;line-height:30px;"><span class="inputYes">*</span>手机</td>
		                    <td style="width:;"><input type="text" id="U_MOBILE" name="data[U_MOBILE]" value="{$userInfo.U_MOBILE}" class="inputxt" datatype="*" nullmsg="请输入手机！"  />
		                     <input type="hidden" id="OLD_U_MOBILE" name="data[OLD_U_MOBILE]" value="{$userInfo.U_MOBILE}"  />
		                    </td>
		                    <td><div class="Validform_checktip">请输入手机</div></td>
		                </tr>
		                 <tr>
		                    <td class="need" style="width:0px;"></td>
		                    <td style="width:80px;line-height:30px;">固定电话</td>
		                    <td style="width:;"><input type="text" id="U_PHONE" name="data[U_PHONE]" value="{$userInfo.U_PHONE}" class="inputxt" nullmsg="请输入固定电话！"  /></td>
		                    <td><div class="Validform_checktip">请输入固定电话</div></td>
		                </tr>
		                 <tr>
		                    <td class="need" style="width:0px;"></td>
		                    <td style="width:80px;line-height:30px;"><span class="inputYes">*</span>地址</td>
		                    <td style="width:;">
		                    <table border="0" cellpacing="0" cellpadding="0">
									<tr>
										<td width="30%">
											<select id="AR_L1" name="data[AR_L1]" datatype="*" style="width:100px;height:25px;">
												<option value="">--省市--</option>
												<volist name="AR_L1" id="vo">
												<option value="{$vo}" <if condition="$seData.AR_L1 eq $vo">selected</if>>{$vo}</option>
												</volist>
											</select>
										</td>
									
										<td width="30%">
											<select  datatype="*"  id="AR_L2" name="data[AR_L2]" style="width:130px;height:25px;">
												<option value="">--市辖区--</option>
											</select>
										</td>
										</tr><tr>
										<td width="30%" colspan="2">
											<select datatype="*" id="AR_L3" name="data[AR_L3]" style="width:180px;height:25px;">
												<option value="">--区县--</option>
											</select>
										</td>
									</tr>
								</table>
		                    </td>
		                    <td><div class="Validform_checktip" style="line-height:30px;">请输入地址</div></td>
		                </tr>
		                
		                <tr>
		                    <td class="need" style="width:0px;"></td>
		                    <td style="width:0px;"></td>
		                    <td style="width:205px;" valign="bottom" align="center">
		                   
		                    	<input type="hidden" name="uid" value="{$uid}">
    							<input type="hidden" name="op" value="1">
    							<div style="display:none"><input type="submit" id="sumit" name="sumit" ></div>
		                    	<img src="__PUBLIC__/images/home/bg-ok-button.png" id="submitImage" align="absmiddle" style="cursor:pointer">
		                    </td>
		                    <td></td>
		                </tr>
		                    
					
					</table>
					</div>
				</td>
			</tr>
			
		</table>
	</div>
	</form>
</div>
</div>